package com.xuebank.nfe.nfecar.adapter

import android.annotation.SuppressLint
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.alibaba.android.vlayout.LayoutHelper
import com.xuebank.nfe.nfecar.R
import com.xuebank.nfe.nfecar.model.ListShop

/**
 * Created by admin Mr.WANG 2019/1/5.
 */
class ListShopAdapter(mData:MutableList<ListShop>, layoutHelper: LayoutHelper, onItemClickListener: OnItemClickListener):
        BaseVirtualLayoutAdapter<ListShop, ListShopAdapter.ListShopViewHolder>(mData, layoutHelper, onItemClickListener){

    private val myItemClickListener : OnItemClickListener ? =null

    @SuppressLint("ResourceAsColor")
    override fun onBindViewHolder(holder: ListShopViewHolder, position: Int) {
        super.onBindViewHolder(holder, position)
        val model = mDatas[position]
        holder.name.text = model.content

    }

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ListShopViewHolder {
        return ListShopViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.item_news_message, parent, false))
    }

    open class ListShopViewHolder constructor(itemView: View) : BaseRecyclerViewHolder(itemView) {

        val name: TextView by lazy {
            getView<TextView>(R.id.shop_list_name)
        }



    }
}